package com.tripwego.client.event;

import com.google.gwt.event.shared.GwtEvent;
import com.tripwego.client.model.EtapeModel;

public class UpdateEtapeEvent extends GwtEvent<UpdateEtapeEventHandler> {

	public static Type<UpdateEtapeEventHandler> TYPE = new Type<UpdateEtapeEventHandler>();

	private EtapeModel etapeModel;

	public UpdateEtapeEvent(EtapeModel etapeModel) {
		this.etapeModel = etapeModel;
	}

	@Override
	public Type<UpdateEtapeEventHandler> getAssociatedType() {
		return TYPE;
	}

	@Override
	protected void dispatch(UpdateEtapeEventHandler handler) {
		handler.handleUpdateEtapeEvent(this);
	}

	/**
	 * @return the etapeModel
	 */
	public EtapeModel getEtapeModel() {
		return etapeModel;
	}

	/**
	 * @param etapeModel
	 *            the etapeModel to set
	 */
	public void setEtapeModel(EtapeModel etapeModel) {
		this.etapeModel = etapeModel;
	}

}